var UIPanel_Recharge = (function () {
    function UIPanel_Recharge() {
        this.panel = null;
    }

    var __proto = UIPanel_Recharge.prototype;
    __proto.init = function () {
        var btn_back = this.panel.getChild("btn_back");
        btn_back.onClick(this, function () {
            this.panel.visible = false;
        })

        this.goldText = this.panel.getChild("gold");
        this.inputText = this.panel.getChild("input");
        this.btn_top = this.panel.getChild("btn_top");
        this.btn_bottom = this.panel.getChild("btn_bottom");

        this.goldText.text = 0;

        this.btn_top.onClick(this, this.clickTop);
        this.btn_bottom.onClick(this, this.clickBottom);

        for (var i = 1; i <= 6; i++) {
            var btn = this.panel.getChild("btnGold" + i);
            btn.onClick(this, this.selectGold);
        }
    }
    __proto.clickTop = function (e) {
        console.log("金币充值  ", this.inputText.text)
    }
    __proto.clickBottom = function (e) {
        console.log("立即充值  ", this.inputText.text)
    }
    __proto.selectGold = function (e) {
        var item = e.target.$owner;
        var num = item.title;
        this.inputText.text = num;
        console.log("Gold  ", num)
    }
    __proto.setGold = function (value) {
        this.goldText.text = value;
    }


    return UIPanel_Recharge;
})()
